package com.yunchang.springboot.mapper.mwsreport;

import com.yunchang.springboot.models.mwsreportbean.MwsLongTermStorageFeeCharges;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MwsLongTermStorageFeeChargesMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MwsLongTermStorageFeeCharges record);

    int insertSelective(MwsLongTermStorageFeeCharges record);

    MwsLongTermStorageFeeCharges selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MwsLongTermStorageFeeCharges record);

    int updateByPrimaryKey(MwsLongTermStorageFeeCharges record);

    /**
     * 获取最新的时间
     * @param sellerId
     * @param area
     * @return
     */
    String getLatestDay(@Param("sellerId") String sellerId, @Param("area") String area);

    /**
     * 根据createTime获取对应的数据
     * @param time
     * @return
     */
    List<MwsLongTermStorageFeeCharges> selectByCreateTime(String time);

    /**
     * 根据financeStatus获取对应的数据
     * @param financeStatus
     * @param limitValue
     * @return
     */
    List<MwsLongTermStorageFeeCharges> selectByFinanceStatus(Integer financeStatus,Integer limitValue);

    /**
     * 根据mwsLongTermStorageFeeChargesList对象集合更新financeStatus
     * @param mwsLongTermStorageFeeChargesList
     * @return
     */
    int updateFinanceStatusByMwsLongTermStorageFeeChargesList(@Param("mwsLongTermStorageFeeChargesList") List<MwsLongTermStorageFeeCharges> mwsLongTermStorageFeeChargesList);
}